//package com.tgsoft.kdcloud.mybatis.config;
//
//import com.baomidou.mybatisplus.extension.plugins.MybatisPlusInterceptor;
//import com.baomidou.mybatisplus.extension.plugins.inner.BlockAttackInnerInterceptor;
//import com.baomidou.mybatisplus.extension.plugins.inner.OptimisticLockerInnerInterceptor;
//import com.baomidou.mybatisplus.extension.plugins.inner.PaginationInnerInterceptor;
//import com.tgsoft.kdcloud.mybatis.handler.FieldMetaObjectHandler;
//import com.tgsoft.kdcloud.mybatis.interceptor.DataScopeInnerInterceptor;
//import org.springframework.context.annotation.Bean;
//import org.springframework.context.annotation.Configuration;
//
///**
// * mybatis-plus 配置
// *
// * @author 阿沐 babamu@126.com
// * <a href="https://maku.net">MAKU</a>
// */
//@Configuration
//public class MybatisPlusConfig {
//
//    @Bean
//    public MybatisPlusInterceptor mybatisPlusInterceptor() {
//        MybatisPlusInterceptor mybatisPlusInterceptor = new MybatisPlusInterceptor();
//        // 数据权限
//        mybatisPlusInterceptor.addInnerInterceptor(new DataScopeInnerInterceptor());
//        // 分页插件
//        mybatisPlusInterceptor.addInnerInterceptor(new PaginationInnerInterceptor());
//        // 乐观锁
//        mybatisPlusInterceptor.addInnerInterceptor(new OptimisticLockerInnerInterceptor());
//        // 防止全表更新与删除
//        mybatisPlusInterceptor.addInnerInterceptor(new BlockAttackInnerInterceptor());
//
//        return mybatisPlusInterceptor;
//    }
//
//    @Bean
//    public FieldMetaObjectHandler fieldMetaObjectHandler(){
//        return new FieldMetaObjectHandler();
//    }
//}
